package com.wlyuan.open.controller.resolver;

import com.wlyuan.open.dto.api.OpenApiCompanyFilterDTO;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * @author lijing
 */
@Service
@RequiredArgsConstructor
public class OpenApiCompanyFilterResolver {

    public void resolver(OpenApiCompanyFilterDTO filter) {
        if (StringUtils.isBlank(filter.getClientName())) {
            filter.setClientId(null);
        }
        if (StringUtils.isBlank(filter.getApiName())) {
            filter.setApiId(null);
        }
    }

    public void clientResolver(OpenApiCompanyFilterDTO filter) {
        //设置登录的客户端id
    }
}
